//auto gen by paipai.java.augogen ver 3.0.0
//author skyzhuang
//source idl: com.icson.deal.idl.ShoppingcartMsgqObject.java


#ifndef ICSON_DEAL_SHOPPINGCART_BO_CSHOPPINGCARTPRODUCTMSGQ_BY_AUTOGEN_V5_H
#define ICSON_DEAL_SHOPPINGCART_BO_CSHOPPINGCARTPRODUCTMSGQ_BY_AUTOGEN_V5_H


#include "app_platform/intf_serializable.h"
#include <string>
#include <sstream>
#include <iostream>


namespace icson
{
namespace deal
{
namespace shoppingcart
{
namespace bo
{


class CShoppingcartProductMsgq : public ISerializable
{
	public:
		std::string m_sLastErrMsg;///<错误信息

		/**
		 * 协议版本号
		 *
		 * 版本 >= 0
		 */
		uint32_t dwVersion;

		/**
		 * 版本 >= 0
		 */
		uint8_t cVersion_u;

		/**
		 * 商品ID
		 *
		 * 版本 >= 0
		 */
		uint64_t ddwProductId;

		/**
		 * 版本 >= 0
		 */
		uint8_t cProductId_u;

		/**
		 * 分站ID, 部分代码是使用whId名称.
		 *
		 * 版本 >= 0
		 */
		uint32_t dwSiteId;

		/**
		 * 版本 >= 0
		 */
		uint8_t cSiteId_u;

		/**
		 * 3级地址ID, 即分区ID, 部分代码是使用prid名称.
		 *
		 * 版本 >= 0
		 */
		uint32_t dwDistrictId;

		/**
		 * 版本 >= 0
		 */
		uint8_t cDistrictId_u;

		/**
		 * 购买数量
		 *
		 * 版本 >= 0
		 */
		uint32_t dwBuyCount;

		/**
		 * 版本 >= 0
		 */
		uint8_t cBuyCount_u;

		/**
		 * 商品主ID, 随心配商品使用
		 *
		 * 版本 >= 0
		 */
		uint64_t ddwMainProductId;

		/**
		 * 版本 >= 0
		 */
		uint8_t cMainProductId_u;

		/**
		 * 价格ID, 原多价使用字段
		 *
		 * 版本 >= 0
		 */
		uint32_t dwPriceId;

		/**
		 * 版本 >= 0
		 */
		uint8_t cPriceId_u;

		/**
		 * otag
		 *
		 * 版本 >= 0
		 */
		std::string strOtag;

		/**
		 * 版本 >= 0
		 */
		uint8_t cOtag_u;

		/**
		 * 商品类型, 0:普通商品, 1:套餐商品, 2:加价购, 3:加价赠
		 *
		 * 版本 >= 0
		 */
		uint8_t cType;

		/**
		 * 版本 >= 0
		 */
		uint8_t cType_u;

		/**
		 * 情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔
		 *
		 * 版本 >= 0
		 */
		std::string strChid;

		/**
		 * 版本 >= 0
		 */
		uint8_t cChid_u;

		/**
		 * 延保ID
		 *
		 * 版本 >= 0
		 */
		uint64_t ddwMaintenanceId;

		/**
		 * 版本 >= 0
		 */
		uint8_t cMaintenanceId_u;

		/**
		 * 套餐商品包括的商品ID, 以@号分隔
		 *
		 * 版本 >= 0
		 */
		std::string strPackageProductsIds;

		/**
		 * 版本 >= 0
		 */
		uint8_t cPackageProductsIds_u;

		/**
		 * 添加该商品时的时间戳
		 *
		 * 版本 >= 0
		 */
		uint32_t dwBuyTime;

		/**
		 * 版本 >= 0
		 */
		uint8_t cBuyTime_u;

		/**
		 * 促销规则id
		 *
		 * 版本 >= 20130919
		 */
		uint64_t ddwPromotionId;

		/**
		 * 促销规则id
		 *
		 * 版本 >= 20130919
		 */
		uint8_t cPromotionId_u;




	public:
		CShoppingcartProductMsgq():
		dwVersion(0),
		cVersion_u(0),
		ddwProductId(0),
		cProductId_u(0),
		dwSiteId(0),
		cSiteId_u(0),
		dwDistrictId(0),
		cDistrictId_u(0),
		dwBuyCount(0),
		cBuyCount_u(0),
		ddwMainProductId(0),
		cMainProductId_u(0),
		dwPriceId(0),
		cPriceId_u(0),
		cOtag_u(0),
		cType(0),
		cType_u(0),
		cChid_u(0),
		ddwMaintenanceId(0),
		cMaintenanceId_u(0),
		cPackageProductsIds_u(0),
		dwBuyTime(0),
		cBuyTime_u(0),
		ddwPromotionId(0),
		cPromotionId_u(0) {}
				CShoppingcartProductMsgq& operator = (const CShoppingcartProductMsgq& obj){

			this->dwVersion = obj.dwVersion;
			this->cVersion_u = obj.cVersion_u;
			this->ddwProductId = obj.ddwProductId;
			this->cProductId_u = obj.cProductId_u;
			this->dwSiteId = obj.dwSiteId;
			this->cSiteId_u = obj.cSiteId_u;
			this->dwDistrictId = obj.dwDistrictId;
			this->cDistrictId_u = obj.cDistrictId_u;
			this->dwBuyCount = obj.dwBuyCount;
			this->cBuyCount_u = obj.cBuyCount_u;
			this->ddwMainProductId = obj.ddwMainProductId;
			this->cMainProductId_u = obj.cMainProductId_u;
			this->dwPriceId = obj.dwPriceId;
			this->cPriceId_u = obj.cPriceId_u;
			this->strOtag = obj.strOtag;
			this->cOtag_u = obj.cOtag_u;
			this->cType = obj.cType;
			this->cType_u = obj.cType_u;
			this->strChid = obj.strChid;
			this->cChid_u = obj.cChid_u;
			this->ddwMaintenanceId = obj.ddwMaintenanceId;
			this->cMaintenanceId_u = obj.cMaintenanceId_u;
			this->strPackageProductsIds = obj.strPackageProductsIds;
			this->cPackageProductsIds_u = obj.cPackageProductsIds_u;
			this->dwBuyTime = obj.dwBuyTime;
			this->cBuyTime_u = obj.cBuyTime_u;
			this->ddwPromotionId = obj.ddwPromotionId;
			this->cPromotionId_u = obj.cPromotionId_u;
			return *this;
		}

	public:


		/**
		 * 是否设置协议版本号了
		 * 
		 * @param uint32_t:dwVersion
		 *  
		 * 
		 */
		 bool  IsVersionSet() const{
				 return  cVersion_u != 0;
		}


		/**
		 * 获取uflag协议版本号了
		 * 
		 * @param uint32_t:dwVersion
		 *  
		 * 
		 */
		 const uint8_t   GetVersionUFlag() const{
				 return  cVersion_u;
		}


		/**
		 * 设置协议版本号
		 * 
		 * @param uint32_t:dwVersion
		 *  
		 * 
		 */
		 void  SetVersion( const uint32_t& sVal, uint8_t cUFlag=1){
				dwVersion = sVal;
				cVersion_u = cUFlag;
		}


		/**
		 * 获取协议版本号
		 * 
		 * @return dwVersion value 类型为:uint32_t
		 * 
		 */
		 const uint32_t&  GetVersion() const {
				return dwVersion;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cVersion_u
		 *  
		 * 
		 */
		 void  SetVersion_u( const uint8_t& sVal){
				cVersion_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cVersion_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetVersion_u() const {
				return cVersion_u;
		}


		/**
		 * 是否设置商品ID了
		 * 
		 * @param uint64_t:ddwProductId
		 *  
		 * 
		 */
		 bool  IsProductIdSet() const{
				 return  cProductId_u != 0;
		}


		/**
		 * 获取uflag商品ID了
		 * 
		 * @param uint64_t:ddwProductId
		 *  
		 * 
		 */
		 const uint8_t   GetProductIdUFlag() const{
				 return  cProductId_u;
		}


		/**
		 * 设置商品ID
		 * 
		 * @param uint64_t:ddwProductId
		 *  
		 * 
		 */
		 void  SetProductId( const uint64_t& sVal, uint8_t cUFlag=1){
				ddwProductId = sVal;
				cProductId_u = cUFlag;
		}


		/**
		 * 获取商品ID
		 * 
		 * @return ddwProductId value 类型为:uint64_t
		 * 
		 */
		 const uint64_t&  GetProductId() const {
				return ddwProductId;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cProductId_u
		 *  
		 * 
		 */
		 void  SetProductId_u( const uint8_t& sVal){
				cProductId_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cProductId_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetProductId_u() const {
				return cProductId_u;
		}


		/**
		 * 是否设置分站ID, 部分代码是使用whId名称.了
		 * 
		 * @param uint32_t:dwSiteId
		 *  
		 * 
		 */
		 bool  IsSiteIdSet() const{
				 return  cSiteId_u != 0;
		}


		/**
		 * 获取uflag分站ID, 部分代码是使用whId名称.了
		 * 
		 * @param uint32_t:dwSiteId
		 *  
		 * 
		 */
		 const uint8_t   GetSiteIdUFlag() const{
				 return  cSiteId_u;
		}


		/**
		 * 设置分站ID, 部分代码是使用whId名称.
		 * 
		 * @param uint32_t:dwSiteId
		 *  
		 * 
		 */
		 void  SetSiteId( const uint32_t& sVal, uint8_t cUFlag=1){
				dwSiteId = sVal;
				cSiteId_u = cUFlag;
		}


		/**
		 * 获取分站ID, 部分代码是使用whId名称.
		 * 
		 * @return dwSiteId value 类型为:uint32_t
		 * 
		 */
		 const uint32_t&  GetSiteId() const {
				return dwSiteId;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cSiteId_u
		 *  
		 * 
		 */
		 void  SetSiteId_u( const uint8_t& sVal){
				cSiteId_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cSiteId_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetSiteId_u() const {
				return cSiteId_u;
		}


		/**
		 * 是否设置3级地址ID, 即分区ID, 部分代码是使用prid名称.了
		 * 
		 * @param uint32_t:dwDistrictId
		 *  
		 * 
		 */
		 bool  IsDistrictIdSet() const{
				 return  cDistrictId_u != 0;
		}


		/**
		 * 获取uflag3级地址ID, 即分区ID, 部分代码是使用prid名称.了
		 * 
		 * @param uint32_t:dwDistrictId
		 *  
		 * 
		 */
		 const uint8_t   GetDistrictIdUFlag() const{
				 return  cDistrictId_u;
		}


		/**
		 * 设置3级地址ID, 即分区ID, 部分代码是使用prid名称.
		 * 
		 * @param uint32_t:dwDistrictId
		 *  
		 * 
		 */
		 void  SetDistrictId( const uint32_t& sVal, uint8_t cUFlag=1){
				dwDistrictId = sVal;
				cDistrictId_u = cUFlag;
		}


		/**
		 * 获取3级地址ID, 即分区ID, 部分代码是使用prid名称.
		 * 
		 * @return dwDistrictId value 类型为:uint32_t
		 * 
		 */
		 const uint32_t&  GetDistrictId() const {
				return dwDistrictId;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cDistrictId_u
		 *  
		 * 
		 */
		 void  SetDistrictId_u( const uint8_t& sVal){
				cDistrictId_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cDistrictId_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetDistrictId_u() const {
				return cDistrictId_u;
		}


		/**
		 * 是否设置购买数量了
		 * 
		 * @param uint32_t:dwBuyCount
		 *  
		 * 
		 */
		 bool  IsBuyCountSet() const{
				 return  cBuyCount_u != 0;
		}


		/**
		 * 获取uflag购买数量了
		 * 
		 * @param uint32_t:dwBuyCount
		 *  
		 * 
		 */
		 const uint8_t   GetBuyCountUFlag() const{
				 return  cBuyCount_u;
		}


		/**
		 * 设置购买数量
		 * 
		 * @param uint32_t:dwBuyCount
		 *  
		 * 
		 */
		 void  SetBuyCount( const uint32_t& sVal, uint8_t cUFlag=1){
				dwBuyCount = sVal;
				cBuyCount_u = cUFlag;
		}


		/**
		 * 获取购买数量
		 * 
		 * @return dwBuyCount value 类型为:uint32_t
		 * 
		 */
		 const uint32_t&  GetBuyCount() const {
				return dwBuyCount;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cBuyCount_u
		 *  
		 * 
		 */
		 void  SetBuyCount_u( const uint8_t& sVal){
				cBuyCount_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cBuyCount_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetBuyCount_u() const {
				return cBuyCount_u;
		}


		/**
		 * 是否设置商品主ID, 随心配商品使用了
		 * 
		 * @param uint64_t:ddwMainProductId
		 *  
		 * 
		 */
		 bool  IsMainProductIdSet() const{
				 return  cMainProductId_u != 0;
		}


		/**
		 * 获取uflag商品主ID, 随心配商品使用了
		 * 
		 * @param uint64_t:ddwMainProductId
		 *  
		 * 
		 */
		 const uint8_t   GetMainProductIdUFlag() const{
				 return  cMainProductId_u;
		}


		/**
		 * 设置商品主ID, 随心配商品使用
		 * 
		 * @param uint64_t:ddwMainProductId
		 *  
		 * 
		 */
		 void  SetMainProductId( const uint64_t& sVal, uint8_t cUFlag=1){
				ddwMainProductId = sVal;
				cMainProductId_u = cUFlag;
		}


		/**
		 * 获取商品主ID, 随心配商品使用
		 * 
		 * @return ddwMainProductId value 类型为:uint64_t
		 * 
		 */
		 const uint64_t&  GetMainProductId() const {
				return ddwMainProductId;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cMainProductId_u
		 *  
		 * 
		 */
		 void  SetMainProductId_u( const uint8_t& sVal){
				cMainProductId_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cMainProductId_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetMainProductId_u() const {
				return cMainProductId_u;
		}


		/**
		 * 是否设置价格ID, 原多价使用字段了
		 * 
		 * @param uint32_t:dwPriceId
		 *  
		 * 
		 */
		 bool  IsPriceIdSet() const{
				 return  cPriceId_u != 0;
		}


		/**
		 * 获取uflag价格ID, 原多价使用字段了
		 * 
		 * @param uint32_t:dwPriceId
		 *  
		 * 
		 */
		 const uint8_t   GetPriceIdUFlag() const{
				 return  cPriceId_u;
		}


		/**
		 * 设置价格ID, 原多价使用字段
		 * 
		 * @param uint32_t:dwPriceId
		 *  
		 * 
		 */
		 void  SetPriceId( const uint32_t& sVal, uint8_t cUFlag=1){
				dwPriceId = sVal;
				cPriceId_u = cUFlag;
		}


		/**
		 * 获取价格ID, 原多价使用字段
		 * 
		 * @return dwPriceId value 类型为:uint32_t
		 * 
		 */
		 const uint32_t&  GetPriceId() const {
				return dwPriceId;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cPriceId_u
		 *  
		 * 
		 */
		 void  SetPriceId_u( const uint8_t& sVal){
				cPriceId_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cPriceId_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetPriceId_u() const {
				return cPriceId_u;
		}


		/**
		 * 是否设置otag了
		 * 
		 * @param std::string:strOtag
		 *  
		 * 
		 */
		 bool  IsOtagSet() const{
				 return  cOtag_u != 0;
		}


		/**
		 * 获取uflagotag了
		 * 
		 * @param std::string:strOtag
		 *  
		 * 
		 */
		 const uint8_t   GetOtagUFlag() const{
				 return  cOtag_u;
		}


		/**
		 * 设置otag
		 * 
		 * @param std::string:strOtag
		 *  
		 * 
		 */
		 void  SetOtag( const std::string& sVal, uint8_t cUFlag=1){
				strOtag = sVal;
				cOtag_u = cUFlag;
		}


		/**
		 * 获取otag
		 * 
		 * @return strOtag value 类型为:std::string
		 * 
		 */
		 const std::string&  GetOtag() const {
				return strOtag;
		}


		/**
		 * 获取otag
		 * 
		 * @return strOtag value 类型为:std::string
		 * 
		 */
		 std::string&  GetOtag() {
				return strOtag;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cOtag_u
		 *  
		 * 
		 */
		 void  SetOtag_u( const uint8_t& sVal){
				cOtag_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cOtag_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetOtag_u() const {
				return cOtag_u;
		}


		/**
		 * 是否设置商品类型, 0:普通商品, 1:套餐商品, 2:加价购, 3:加价赠了
		 * 
		 * @param uint8_t:cType
		 *  
		 * 
		 */
		 bool  IsTypeSet() const{
				 return  cType_u != 0;
		}


		/**
		 * 获取uflag商品类型, 0:普通商品, 1:套餐商品, 2:加价购, 3:加价赠了
		 * 
		 * @param uint8_t:cType
		 *  
		 * 
		 */
		 const uint8_t   GetTypeUFlag() const{
				 return  cType_u;
		}


		/**
		 * 设置商品类型, 0:普通商品, 1:套餐商品, 2:加价购, 3:加价赠
		 * 
		 * @param uint8_t:cType
		 *  
		 * 
		 */
		 void  SetType( const uint8_t& sVal, uint8_t cUFlag=1){
				cType = sVal;
				cType_u = cUFlag;
		}


		/**
		 * 获取商品类型, 0:普通商品, 1:套餐商品, 2:加价购, 3:加价赠
		 * 
		 * @return cType value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetType() const {
				return cType;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cType_u
		 *  
		 * 
		 */
		 void  SetType_u( const uint8_t& sVal){
				cType_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cType_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetType_u() const {
				return cType_u;
		}


		/**
		 * 是否设置情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔了
		 * 
		 * @param std::string:strChid
		 *  
		 * 
		 */
		 bool  IsChidSet() const{
				 return  cChid_u != 0;
		}


		/**
		 * 获取uflag情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔了
		 * 
		 * @param std::string:strChid
		 *  
		 * 
		 */
		 const uint8_t   GetChidUFlag() const{
				 return  cChid_u;
		}


		/**
		 * 设置情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔
		 * 
		 * @param std::string:strChid
		 *  
		 * 
		 */
		 void  SetChid( const std::string& sVal, uint8_t cUFlag=1){
				strChid = sVal;
				cChid_u = cUFlag;
		}


		/**
		 * 获取情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔
		 * 
		 * @return strChid value 类型为:std::string
		 * 
		 */
		 const std::string&  GetChid() const {
				return strChid;
		}


		/**
		 * 获取情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔
		 * 
		 * @return strChid value 类型为:std::string
		 * 
		 */
		 std::string&  GetChid() {
				return strChid;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cChid_u
		 *  
		 * 
		 */
		 void  SetChid_u( const uint8_t& sVal){
				cChid_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cChid_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetChid_u() const {
				return cChid_u;
		}


		/**
		 * 是否设置延保ID了
		 * 
		 * @param uint64_t:ddwMaintenanceId
		 *  
		 * 
		 */
		 bool  IsMaintenanceIdSet() const{
				 return  cMaintenanceId_u != 0;
		}


		/**
		 * 获取uflag延保ID了
		 * 
		 * @param uint64_t:ddwMaintenanceId
		 *  
		 * 
		 */
		 const uint8_t   GetMaintenanceIdUFlag() const{
				 return  cMaintenanceId_u;
		}


		/**
		 * 设置延保ID
		 * 
		 * @param uint64_t:ddwMaintenanceId
		 *  
		 * 
		 */
		 void  SetMaintenanceId( const uint64_t& sVal, uint8_t cUFlag=1){
				ddwMaintenanceId = sVal;
				cMaintenanceId_u = cUFlag;
		}


		/**
		 * 获取延保ID
		 * 
		 * @return ddwMaintenanceId value 类型为:uint64_t
		 * 
		 */
		 const uint64_t&  GetMaintenanceId() const {
				return ddwMaintenanceId;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cMaintenanceId_u
		 *  
		 * 
		 */
		 void  SetMaintenanceId_u( const uint8_t& sVal){
				cMaintenanceId_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cMaintenanceId_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetMaintenanceId_u() const {
				return cMaintenanceId_u;
		}


		/**
		 * 是否设置套餐商品包括的商品ID, 以@号分隔了
		 * 
		 * @param std::string:strPackageProductsIds
		 *  
		 * 
		 */
		 bool  IsPackageProductsIdsSet() const{
				 return  cPackageProductsIds_u != 0;
		}


		/**
		 * 获取uflag套餐商品包括的商品ID, 以@号分隔了
		 * 
		 * @param std::string:strPackageProductsIds
		 *  
		 * 
		 */
		 const uint8_t   GetPackageProductsIdsUFlag() const{
				 return  cPackageProductsIds_u;
		}


		/**
		 * 设置套餐商品包括的商品ID, 以@号分隔
		 * 
		 * @param std::string:strPackageProductsIds
		 *  
		 * 
		 */
		 void  SetPackageProductsIds( const std::string& sVal, uint8_t cUFlag=1){
				strPackageProductsIds = sVal;
				cPackageProductsIds_u = cUFlag;
		}


		/**
		 * 获取套餐商品包括的商品ID, 以@号分隔
		 * 
		 * @return strPackageProductsIds value 类型为:std::string
		 * 
		 */
		 const std::string&  GetPackageProductsIds() const {
				return strPackageProductsIds;
		}


		/**
		 * 获取套餐商品包括的商品ID, 以@号分隔
		 * 
		 * @return strPackageProductsIds value 类型为:std::string
		 * 
		 */
		 std::string&  GetPackageProductsIds() {
				return strPackageProductsIds;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cPackageProductsIds_u
		 *  
		 * 
		 */
		 void  SetPackageProductsIds_u( const uint8_t& sVal){
				cPackageProductsIds_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cPackageProductsIds_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetPackageProductsIds_u() const {
				return cPackageProductsIds_u;
		}


		/**
		 * 是否设置添加该商品时的时间戳了
		 * 
		 * @param uint32_t:dwBuyTime
		 *  
		 * 
		 */
		 bool  IsBuyTimeSet() const{
				 return  cBuyTime_u != 0;
		}


		/**
		 * 获取uflag添加该商品时的时间戳了
		 * 
		 * @param uint32_t:dwBuyTime
		 *  
		 * 
		 */
		 const uint8_t   GetBuyTimeUFlag() const{
				 return  cBuyTime_u;
		}


		/**
		 * 设置添加该商品时的时间戳
		 * 
		 * @param uint32_t:dwBuyTime
		 *  
		 * 
		 */
		 void  SetBuyTime( const uint32_t& sVal, uint8_t cUFlag=1){
				dwBuyTime = sVal;
				cBuyTime_u = cUFlag;
		}


		/**
		 * 获取添加该商品时的时间戳
		 * 
		 * @return dwBuyTime value 类型为:uint32_t
		 * 
		 */
		 const uint32_t&  GetBuyTime() const {
				return dwBuyTime;
		}


		/**
		 * 设置
		 * 
		 * 此字段的版本 >= 1
		 * @param uint8_t:cBuyTime_u
		 *  
		 * 
		 */
		 void  SetBuyTime_u( const uint8_t& sVal){
				cBuyTime_u = sVal;
		}


		/**
		 * 获取
		 * 
		 * @return cBuyTime_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetBuyTime_u() const {
				return cBuyTime_u;
		}


		/**
		 * 是否设置促销规则id了
		 * 
		 * @param uint64_t:ddwPromotionId
		 *  
		 * 
		 */
		 bool  IsPromotionIdSet() const{
				 return  cPromotionId_u != 0;
		}


		/**
		 * 获取uflag促销规则id了
		 * 
		 * @param uint64_t:ddwPromotionId
		 *  
		 * 
		 */
		 const uint8_t   GetPromotionIdUFlag() const{
				 return  cPromotionId_u;
		}


		/**
		 * 设置促销规则id
		 * 
		 * @param uint64_t:ddwPromotionId
		 *  
		 * 
		 */
		 void  SetPromotionId( const uint64_t& sVal, uint8_t cUFlag=1){
				ddwPromotionId = sVal;
				cPromotionId_u = cUFlag;
		}


		/**
		 * 获取促销规则id
		 * 
		 * @return ddwPromotionId value 类型为:uint64_t
		 * 
		 */
		 const uint64_t&  GetPromotionId() const {
				return ddwPromotionId;
		}


		/**
		 * 设置促销规则id
		 * 
		 * 此字段的版本 >= 20130919
		 * @param uint8_t:cPromotionId_u
		 *  
		 * 
		 */
		 void  SetPromotionId_u( const uint8_t& sVal){
				cPromotionId_u = sVal;
		}


		/**
		 * 获取促销规则id
		 * 
		 * @return cPromotionId_u value 类型为:uint8_t
		 * 
		 */
		 const uint8_t&  GetPromotionId_u() const {
				return cPromotionId_u;
		}

		virtual bool Serialize(CByteStreamNetwork& bs){
		
			uint32_t dwMyLen = 0;
			if(bs.isStoring()) //for write in buffer
			{
				//can not larger than 1 M.
				CByteStreamNetwork bsDummy(NULL, 1024 * 1024, false);
				//bsDummy for precheck the xo size...
				bsDummy.isStoring(true);
				Serialize_i(bsDummy);
				dwMyLen = bsDummy.getWrittenLength();
				bs & dwMyLen;
				Serialize_i(bs);
			}
			else
			{    //for read from buffer
				bs & dwMyLen;
				uint32_t dwReadedLen = bs.getReadLength();
				Serialize_i(bs);
				dwReadedLen = bs.getReadLength() - dwReadedLen;
				// dwReadedLen for the size of xo
				if( dwReadedLen > dwMyLen ){
					return false;
				}
				//go through the unwanted mem position...
				bs.goForward( dwMyLen - dwReadedLen );
			}

			return bs.isGood();
		}

		bool Serialize_i(CByteStreamNetwork& bsTmp){

			bsTmp & dwVersion; // 序列化协议版本号 类型为uint32_t
			bsTmp & cVersion_u; // 序列化 类型为uint8_t
			bsTmp & ddwProductId; // 序列化商品ID 类型为uint64_t
			bsTmp & cProductId_u; // 序列化 类型为uint8_t
			bsTmp & dwSiteId; // 序列化分站ID, 部分代码是使用whId名称. 类型为uint32_t
			bsTmp & cSiteId_u; // 序列化 类型为uint8_t
			bsTmp & dwDistrictId; // 序列化3级地址ID, 即分区ID, 部分代码是使用prid名称. 类型为uint32_t
			bsTmp & cDistrictId_u; // 序列化 类型为uint8_t
			bsTmp & dwBuyCount; // 序列化购买数量 类型为uint32_t
			bsTmp & cBuyCount_u; // 序列化 类型为uint8_t
			bsTmp & ddwMainProductId; // 序列化商品主ID, 随心配商品使用 类型为uint64_t
			bsTmp & cMainProductId_u; // 序列化 类型为uint8_t
			bsTmp & dwPriceId; // 序列化价格ID, 原多价使用字段 类型为uint32_t
			bsTmp & cPriceId_u; // 序列化 类型为uint8_t
			bsTmp & strOtag; // 序列化otag 类型为String
			bsTmp & cOtag_u; // 序列化 类型为uint8_t
			bsTmp & cType; // 序列化商品类型, 0:普通商品, 1:套餐商品, 2:加价购, 3:加价赠 类型为uint8_t
			bsTmp & cType_u; // 序列化 类型为uint8_t
			bsTmp & strChid; // 序列化情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔 类型为String
			bsTmp & cChid_u; // 序列化 类型为uint8_t
			bsTmp & ddwMaintenanceId; // 序列化延保ID 类型为uint64_t
			bsTmp & cMaintenanceId_u; // 序列化 类型为uint8_t
			bsTmp & strPackageProductsIds; // 序列化套餐商品包括的商品ID, 以@号分隔 类型为String
			bsTmp & cPackageProductsIds_u; // 序列化 类型为uint8_t
			bsTmp & dwBuyTime; // 序列化添加该商品时的时间戳 类型为uint32_t
			bsTmp & cBuyTime_u; // 序列化 类型为uint8_t
			if( dwVersion >= 20130919 ){
				bsTmp & ddwPromotionId; // 序列化促销规则id 类型为uint64_t
			}
			if( dwVersion >= 20130919 ){
				bsTmp & cPromotionId_u; // 序列化促销规则id 类型为uint8_t
			}
			return bsTmp.isGood();
		}

		const char* GetLastErrMsg() const{
			return m_sLastErrMsg.c_str();
		}

		bool VerifyShoppingcartProductMsgq(){

			if(!IsVersionSet()){
				m_sLastErrMsg = "Miss Param:Version";
				return false;
			}

			if(!IsProductIdSet()){
				m_sLastErrMsg = "Miss Param:productId";
				return false;
			}

			if(!IsSiteIdSet()){
				m_sLastErrMsg = "Miss Param:siteId";
				return false;
			}

			if(!IsDistrictIdSet()){
				m_sLastErrMsg = "Miss Param:districtId";
				return false;
			}

			if(!IsBuyCountSet()){
				m_sLastErrMsg = "Miss Param:buyCount";
				return false;
			}

			if(!IsMainProductIdSet()){
				m_sLastErrMsg = "Miss Param:mainProductId";
				return false;
			}

			if(!IsPriceIdSet()){
				m_sLastErrMsg = "Miss Param:priceId";
				return false;
			}

			if(!IsOtagSet()){
				m_sLastErrMsg = "Miss Param:otag";
				return false;
			}

			if(!IsTypeSet()){
				m_sLastErrMsg = "Miss Param:type";
				return false;
			}

			if(!IsChidSet()){
				m_sLastErrMsg = "Miss Param:chid";
				return false;
			}

			if(!IsMaintenanceIdSet()){
				m_sLastErrMsg = "Miss Param:maintenanceId";
				return false;
			}

			if(!IsPackageProductsIdsSet()){
				m_sLastErrMsg = "Miss Param:packageProductsIds";
				return false;
			}

			if(!IsBuyTimeSet()){
				m_sLastErrMsg = "Miss Param:buyTime";
				return false;
			}

			if(!IsPromotionIdSet()){
				m_sLastErrMsg = "Miss Param:promotionId";
				return false;
			}
			return true;
		}

		void DumpData(std::ostream& oss) const{
		
			oss<<"[dwVersion:"<<dwVersion<<"] ";
			oss<<"[cVersion_u:"<<(int)cVersion_u<<"] ";
			oss<<"[ddwProductId:"<<ddwProductId<<"] ";
			oss<<"[cProductId_u:"<<(int)cProductId_u<<"] ";
			oss<<"[dwSiteId:"<<dwSiteId<<"] ";
			oss<<"[cSiteId_u:"<<(int)cSiteId_u<<"] ";
			oss<<"[dwDistrictId:"<<dwDistrictId<<"] ";
			oss<<"[cDistrictId_u:"<<(int)cDistrictId_u<<"] ";
			oss<<"[dwBuyCount:"<<dwBuyCount<<"] ";
			oss<<"[cBuyCount_u:"<<(int)cBuyCount_u<<"] ";
			oss<<"[ddwMainProductId:"<<ddwMainProductId<<"] ";
			oss<<"[cMainProductId_u:"<<(int)cMainProductId_u<<"] ";
			oss<<"[dwPriceId:"<<dwPriceId<<"] ";
			oss<<"[cPriceId_u:"<<(int)cPriceId_u<<"] ";
			oss<<"[strOtag:"<<strOtag<<"] ";
			oss<<"[cOtag_u:"<<(int)cOtag_u<<"] ";
			oss<<"[cType:"<<(int)cType<<"] ";
			oss<<"[cType_u:"<<(int)cType_u<<"] ";
			oss<<"[strChid:"<<strChid<<"] ";
			oss<<"[cChid_u:"<<(int)cChid_u<<"] ";
			oss<<"[ddwMaintenanceId:"<<ddwMaintenanceId<<"] ";
			oss<<"[cMaintenanceId_u:"<<(int)cMaintenanceId_u<<"] ";
			oss<<"[strPackageProductsIds:"<<strPackageProductsIds<<"] ";
			oss<<"[cPackageProductsIds_u:"<<(int)cPackageProductsIds_u<<"] ";
			oss<<"[dwBuyTime:"<<dwBuyTime<<"] ";
			oss<<"[cBuyTime_u:"<<(int)cBuyTime_u<<"] ";
			if( dwVersion >= 20130919 ){
				oss<<"[ddwPromotionId:"<<ddwPromotionId<<"] ";
			}
			if( dwVersion >= 20130919 ){
				oss<<"[cPromotionId_u:"<<(int)cPromotionId_u<<"] ";
			}
		
		}

		// codydeng提供,非常好的dump方法 ^-^  。。。。。
		template<typename T>
		T & DumpPlusData(T& oss){
			oss<<"dwVersion:"<<dwVersion;
			oss<<"cVersion_u:"<<cVersion_u;
			oss<<"ddwProductId:"<<ddwProductId;
			oss<<"cProductId_u:"<<cProductId_u;
			oss<<"dwSiteId:"<<dwSiteId;
			oss<<"cSiteId_u:"<<cSiteId_u;
			oss<<"dwDistrictId:"<<dwDistrictId;
			oss<<"cDistrictId_u:"<<cDistrictId_u;
			oss<<"dwBuyCount:"<<dwBuyCount;
			oss<<"cBuyCount_u:"<<cBuyCount_u;
			oss<<"ddwMainProductId:"<<ddwMainProductId;
			oss<<"cMainProductId_u:"<<cMainProductId_u;
			oss<<"dwPriceId:"<<dwPriceId;
			oss<<"cPriceId_u:"<<cPriceId_u;
			oss<<"strOtag:"<<strOtag;
			oss<<"cOtag_u:"<<cOtag_u;
			oss<<"cType:"<<cType;
			oss<<"cType_u:"<<cType_u;
			oss<<"strChid:"<<strChid;
			oss<<"cChid_u:"<<cChid_u;
			oss<<"ddwMaintenanceId:"<<ddwMaintenanceId;
			oss<<"cMaintenanceId_u:"<<cMaintenanceId_u;
			oss<<"strPackageProductsIds:"<<strPackageProductsIds;
			oss<<"cPackageProductsIds_u:"<<cPackageProductsIds_u;
			oss<<"dwBuyTime:"<<dwBuyTime;
			oss<<"cBuyTime_u:"<<cBuyTime_u;
			if( dwVersion >= 20130919 ){
				oss<<"ddwPromotionId:"<<ddwPromotionId;
			}
			if( dwVersion >= 20130919 ){
				oss<<"cPromotionId_u:"<<cPromotionId_u;
			}
			return oss;
		}

		// wileywang提供,树形dump方法 ^-^  。。。。。
		void DumpDataTree(std::ostream& os, int ident = 0)const {
			g_pprint(os, "dwVersion", dwVersion, ident);
			g_pprint(os, "cVersion_u", cVersion_u, ident);
			g_pprint(os, "ddwProductId", ddwProductId, ident);
			g_pprint(os, "cProductId_u", cProductId_u, ident);
			g_pprint(os, "dwSiteId", dwSiteId, ident);
			g_pprint(os, "cSiteId_u", cSiteId_u, ident);
			g_pprint(os, "dwDistrictId", dwDistrictId, ident);
			g_pprint(os, "cDistrictId_u", cDistrictId_u, ident);
			g_pprint(os, "dwBuyCount", dwBuyCount, ident);
			g_pprint(os, "cBuyCount_u", cBuyCount_u, ident);
			g_pprint(os, "ddwMainProductId", ddwMainProductId, ident);
			g_pprint(os, "cMainProductId_u", cMainProductId_u, ident);
			g_pprint(os, "dwPriceId", dwPriceId, ident);
			g_pprint(os, "cPriceId_u", cPriceId_u, ident);
			g_pprint(os, "strOtag", strOtag, ident);
			g_pprint(os, "cOtag_u", cOtag_u, ident);
			g_pprint(os, "cType", cType, ident);
			g_pprint(os, "cType_u", cType_u, ident);
			g_pprint(os, "strChid", strChid, ident);
			g_pprint(os, "cChid_u", cChid_u, ident);
			g_pprint(os, "ddwMaintenanceId", ddwMaintenanceId, ident);
			g_pprint(os, "cMaintenanceId_u", cMaintenanceId_u, ident);
			g_pprint(os, "strPackageProductsIds", strPackageProductsIds, ident);
			g_pprint(os, "cPackageProductsIds_u", cPackageProductsIds_u, ident);
			g_pprint(os, "dwBuyTime", dwBuyTime, ident);
			g_pprint(os, "cBuyTime_u", cBuyTime_u, ident);
			if( dwVersion >= 20130919 ){
				g_pprint(os, "ddwPromotionId", ddwPromotionId, ident);
			}
			if( dwVersion >= 20130919 ){
				g_pprint(os, "cPromotionId_u", cPromotionId_u, ident);
			}
		}
		
		//提供ToString借口，默认为DumpData格式，请按需要进行修改
		std::string ToString() const{
			std::stringstream ss;
			DumpData(ss);
			return ss.str();
		}

/**
 ********************以下信息是每个版本的字段********************
 *
 *****以下是版本20130919所包含的字段*******
 *	uint32_t dwVersion;///<协议版本号
 *	uint8_t cVersion_u;
 *	uint64_t ddwProductId;///<商品ID
 *	uint8_t cProductId_u;
 *	uint32_t dwSiteId;///<分站ID, 部分代码是使用whId名称.
 *	uint8_t cSiteId_u;
 *	uint32_t dwDistrictId;///<3级地址ID, 即分区ID, 部分代码是使用prid名称.
 *	uint8_t cDistrictId_u;
 *	uint32_t dwBuyCount;///<购买数量
 *	uint8_t cBuyCount_u;
 *	uint64_t ddwMainProductId;///<商品主ID, 随心配商品使用
 *	uint8_t cMainProductId_u;
 *	uint32_t dwPriceId;///<价格ID, 原多价使用字段
 *	uint8_t cPriceId_u;
 *	std::string strOtag;///<otag
 *	uint8_t cOtag_u;
 *	uint8_t cType;///<商品类型, 0:普通商品, 1:套餐商品, 2:加价购, 3:加价赠
 *	uint8_t cType_u;
 *	std::string strChid;///<情景ID, 多价2.0使用, 字符串. 保留原来的做法使用@分隔
 *	uint8_t cChid_u;
 *	uint64_t ddwMaintenanceId;///<延保ID
 *	uint8_t cMaintenanceId_u;
 *	std::string strPackageProductsIds;///<套餐商品包括的商品ID, 以@号分隔
 *	uint8_t cPackageProductsIds_u;
 *	uint32_t dwBuyTime;///<添加该商品时的时间戳
 *	uint8_t cBuyTime_u;
 *	uint64_t ddwPromotionId;///<促销规则id
 *	uint8_t cPromotionId_u;///<促销规则id
 *****以上是版本20130919所包含的字段*******
 */

};

}
}
}
}

#endif /* ICSON_DEAL_SHOPPINGCART_BO_CSHOPPINGCARTPRODUCTMSGQ_BY_AUTOGEN_V5_H */
